package org.summer.generator.config;

import lombok.Data;

/**
 * 创建文件配置信息，此类确定需要创建那些文件的代码
 */
@Data
public class CreateConfig {
    private boolean createDir;
    private boolean createEntityFile;
    private boolean createMapperFile;
    private boolean createMapperXmlFile;
    private boolean createRepositoryFile;
    private boolean createServiceFile;
    private boolean createControllerFile;
    private boolean createDtoFile;
    private boolean createTypescriptTypeFile;
    private boolean createTypescriptAntdTableColumnsFile;
    private boolean createTypescriptReduxReducerFile;

    /**
     * 设置全部属性状态
     */
    public void setAll(boolean flag){
        this.createDir = flag;
        this.createEntityFile = flag;
        this.createMapperFile = flag;
        this.createMapperXmlFile = flag;
        this.createRepositoryFile = flag;
        this.createServiceFile = flag;
        this.createControllerFile = flag;
        this.createDtoFile = flag;
        this.createTypescriptTypeFile = flag;
        this.createTypescriptAntdTableColumnsFile = flag;
        this.createTypescriptReduxReducerFile = flag;
    }
}
